﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.SkillEffective + "/" + SkillEditorConst.Buff, typeof(SkillEditorGraph))]
    public class SkillEffectiveNode_Buff : SkillEffectiveNode
    {
        protected override ESkillEffectiveType effectType => ESkillEffectiveType.Buff;

        [Output] public FormulaSetter buffID;
        [Output("层数")] public FormulaSetter stack;
        [Output("外参")] public FormulaSetter param;
        [InspectorName("移除")]public bool remove;

        protected override SkillCustomConfig CreateConfig()
        {
            var rConfig = new SkillEffective_Buff_ConfigData()
            {
                remove = this.remove
            };
            this.buffID = new FormulaSetter((x) => rConfig.buffID = x);
            this.stack = new FormulaSetter((x) => rConfig.stack = x);
            this.param = new FormulaSetter((x) => rConfig.param = x);
            return rConfig;
        }
    }
}